package com.wyx.mhl.service;

import com.wyx.mhl.dao.EmployeeDao;
import com.wyx.mhl.domain.employee;

/**
 * @author 王艺锡
 * @version 1.0
 * 该类用于对employee表进行操作(调用employeeDao)
 */
public class EmployeeService {
     private EmployeeDao employeeDao = new EmployeeDao();


     //编写登录方法，根据员工id和pwd验证是否登录成功
     //成功则返回一个员工信息，失败则返回null
     public employee enroll(String empId,String pwd){
          return employeeDao.querySingle("select * from employee where empId = ? and pwd = md5(?)",employee.class,empId, pwd);

     }


}
